export const getDataThroughCallback = fn => {
    setTimeout(() => {
        fn({
            name: "hi async!"
        });
    }, 1000);
};

export const getDataThroughPromise = () => {
    return new Promise((resolve, reject) => {
        setTimeout(() => {
            resolve({
                name: "hi async!"
            });
        }, 1000);
    });
};